package com.cmc.cloud.cmclink.doc.api.document;

import com.cmc.cloud.cmclink.doc.api.document.rep.VoyageBsaRespDto;
import com.cmc.cloud.cmclink.doc.api.document.req.VoyageBsaReqDto;
import com.cmc.cloud.cmclink.doc.constant.DocApiConstants;
import com.cmes.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * 开仓状态查询
 *
 * @author lzp
 */

@FeignClient(name = DocApiConstants.NAME)
@Tag(name = "RPC - 服务 开仓状态查询")
@Validated
public interface VoyageBsaApi {

    String PREFIX = DocApiConstants.PREFIX + "/voyageBsa";

    /**
     * 开仓状态查询为了避免批量调用接口，这里的参数改成list以及港口信息不传递，因为数据的存储是多个拼接在一起
     *
     * @param voyageBsaReqDto
     * @return
     */
    @PostMapping(PREFIX + "/query")
    @Operation(summary = "开仓状态查询")
    CommonResult<List<VoyageBsaRespDto>> voyageBsaQuery(@RequestBody @Valid VoyageBsaReqDto voyageBsaReqDto);
}
